﻿
@{
    ViewData["Title"] = "清理日志";
    Layout = "~/Views/Shared/_ManageFormLayout.cshtml";
}


<form id="form1">
    <div class="mdui-container">
        <div class="mdui-row">
            <div class="mdui-col-xs-12 mdui-col-md-6 mdui-m-t-3">
                <div class="mdui-list">
                    <div class="mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons">help_outline</i>
                        <div class="mdui-list-item-content">
                            <div class="mdui-list-item-title mdui-list-item-one-line">清理日志</div>
                            <div class="mdui-list-item-text">日志记录将生成大量数据，定期清理可防止因日志数据库文件过大。</div>
                        </div>
                    </div>

                    <div class="mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons">cloud_download</i>
                        <div class="mdui-list-item-content">
                            <div class="mdui-list-item-title mdui-list-item-one-line">导出选项</div>
                            <div class="mdui-list-item-text">将要清理的日志导出为excel下载到本地。</div>
                        </div>
                        <label class="mdui-switch">
                            <input type="checkbox" checked />
                            <i class="mdui-switch-icon"></i>
                        </label>
                    </div>

                </div>

                <div class="mdui-divider"></div>

                <div class="mdui-m-t-2">
                    <label class="mdui-radio">
                        <input type="radio" name="ck" id="ck0" value="0" checked />
                        <i class="mdui-radio-icon"></i>
                        清理一年前日志
                    </label>
                </div>
                
                <div class="mdui-m-t-2">
                    <label class="mdui-radio">
                        <input type="radio" name="ck" id="ck1" value="1" />
                        <i class="mdui-radio-icon"></i>
                        清理半年前日志
                    </label>
                </div>
                <div class="mdui-m-t-2">
                    <label class="mdui-radio">
                        <input type="radio" name="ck" id="ck2" value="2" />
                        <i class="mdui-radio-icon"></i>
                        清理三个月前日志
                    </label>
                </div>
                <div class="mdui-m-t-2">
                    <label class="mdui-radio">
                        <input type="radio" name="ck" id="ck3" value="3" />
                        <i class="mdui-radio-icon"></i>
                        清理一个月前日志
                    </label>
                </div>
            </div>
        </div>
    </div>
</form>

@section Scripts{ 
    <script>
        $(function () {

        });

        function submitForm() {
            var postData = $('#form1').formSerialize();
            
            $.submitForm({
                url: "/SystemSecurity/DatabaseLog/ClearLogSubmit",
                param: postData,
                success: function () {
                    $.currentWindow().location.reload();
                }
            });

        };
    </script>

}
